package be.ipl.diavolo.servlets;


import java.io.IOException;

import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import be.ipl.Diavolo.ucc.GestionPartie;

/**
 * Servlet implementation class Profil
 */
@WebServlet(name="creation.html")
public class CreerPartie extends HttpServlet {
	private static final long serialVersionUID = 1L;
	
	@EJB
	private GestionPartie gestionPartie;
	
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		
		//Partie p = gestionPartie.creerPartie(request.getAttribute("creer"), request.getSession().getAttribute(joueur));
		
		response.sendRedirect(response.encodeRedirectURL("attente.html"));
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		doGet(request,response);
	}

}